package tan.dft.gps;

import tan.dft.listviewlotrinh.Mainlotrinh;
import tan.dft.quanly.Quanlydanhsachmain;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class MainActivity extends Activity {

	private int idmay;

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);

		Intent intent = getIntent();
		Bundle bundle = intent.getExtras();
		idmay = bundle.getInt("idmay");

		Button danhsachquanly = (Button) findViewById(R.id.danhsachquanly);
		danhsachquanly.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this,
						tan.dft.taphost.AndroidTabLayoutActivity.class);
				Bundle bundle = new Bundle();
				bundle.putInt("idmay", idmay);
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
		Button danduong = (Button) findViewById(R.id.danduong);
		danduong.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, Danduong.class);
				startActivity(intent);
			}
		});
		Button showmaps = (Button) findViewById(R.id.showmaps);
		showmaps.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this,
						Quanlydanhsachmain.class);
				Bundle bundle = new Bundle();
				bundle.putInt("idmay", idmay);
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
		Button lotrinh = (Button) findViewById(R.id.lotrinh);
		lotrinh.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View v) {
				Intent intent = new Intent(MainActivity.this, Mainlotrinh.class);
				Bundle bundle = new Bundle();
				bundle.putInt("idmay", idmay);
				intent.putExtras(bundle);
				startActivity(intent);
			}
		});
	}

}
